<?php

namespace addons\qingdongams\model;

use app\common\library\StaffAuth;
use think\Model;
use traits\model\SoftDelete;

/**
 *
 */
class Person extends Model
{
    use SoftDelete;

    protected $name = 'qingdongams_person';
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = 'deletetime';



    public function getAvatarAttr($value)
    {
        if ($value) {
            return cdnurl($value, true);
        } else {
            return $value;
        }
    }


    public function getCreatetimeAttr($value)
    {
        return date('Y-m-d H:i:s', $value);
    }




}
